<template>
    <div class="company-user">
        <index-breadcrumb :breadcrumb-list="breadcrumbList"></index-breadcrumb>
        <notifyTemplate :operation-list="operationList" :is-show="showStatus">
        </notifyTemplate>
    </div>
</template>

<script>
import notifyTemplate from "@/views/notifyTemplate/includes/NotifyTemplate";

export default {
    name: "NotifyTemplate",
    components: {
        notifyTemplate,
    },
    data() {
        return {
            operationList: [],
            breadcrumbList: [
                {
                    title: "消息模板管理"
                },
            ],
            showStatus: true,
        };
    },
    activated() {
        this.getOperationList();
    },
    methods: {
        backShow() {
            this.showStatus = true
        },
        getOperationList() {
            this.$store.state.permissionList.forEach(item => {
                const [itemName] = item.permission.split(":");
                if (itemName === "notifyTemplate") {
                    this.operationList = item.list.map(listItem => {
                        return listItem.permission.split(":")[1];
                    });
                }
            });
        }
    },
};
</script>

<style lang="sass" scoped>

</style>
